<template>
    <div class="flex_col m5 p10 card">
        <label>修改操作需要输入密码</label>
        <div class="flex_row_center mt10">
            <label>账号:</label>
            <el-input v-model="ctx.name" style="width: 200px;" />
        </div>
        <div class="flex_row_center mt10">
            <label>密码:</label>
            <el-input v-model="ctx.pwd" style="width: 200px;" />
        </div>
        <el-button class="mt10" @click="onLogin" type="primary">登录</el-button>
    </div>
</template>


<script lang="ts" setup>
import { setLogin } from '@/service/base';
import { reactive } from 'vue';


interface Ctx {
    name: string,
    pwd: string,
}

const ctx = reactive<Ctx>({
    name: '',
    pwd: ''
});

function onLogin() {
    setLogin(ctx.name, ctx.pwd);
}


</script>
